import React, {PureComponent} from 'react'

class Info extends PureComponent {
    constructor() {
        super()
    }

    componentDidMount() {

    }

    render() {
        const {data} = this.props
        const rows = [
            {
                title: '线体名称',
                value: data.productionLine
            }, {
                title: '设备名称',
                value: data.deviceName
            }, {
                title: '设备品牌',
                value: data.deviceBand
            }, {
                title: '设备编号',
                value: data.deviceId
            }, {
                title: '操作人员',
                value: data.operator
            }, {
                title: '今日产量',
                value: data.productCount
            }
        ]
        return (
            <div className="device-info-container">
                <img src={this.props.src}/>
                <div className="device-info-list">
                    {rows.map(r => {
                        return <div className="device-info-text">
                            <span>{r.title}</span>
                            <span>{r.value}</span>
                        </div>
                    })}
                </div>
            </div>
        )
    }

}

export default Info